<?php
class MY_Controller extends CI_Controller
{
    function __construct()
    {
        parent::__construct();
        //$this->output->enable_profiler();
        $user_role = $this->session->userdata('user_role');
        if ($user_role != 'administrator') {
            redirect('admin/user/login');
        }
    }
}